<?php
defined('SYS_RUN') or exit();

class Autoload {

    static $dirs = array(
        'sys/core/base/',
        'sys/core/exception/',
        'sys/core/abstract/',
        'sys/core/singleton/',
        'application/class/'
    );

    public static function load($class_name) {
        foreach(self::$dirs as $dir) {
            $file = $dir.'class.'.$class_name.'.inc.php';
            if(file_exists($file)) {
                include_once $file;
                break;
            }

        }
    }

}